fix: replace hardcoded 60s timeout in deploy_model() with INFERENCE_TX_TIMEOUT#220
Merged
adambalogh merged 1 commit intoOpenGradient:mainfrom Apr 1, 2026
Conversation
Contributor
Author
adambalogh
approved these changes
Apr 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🐛 Bug: Hardcoded Magic-Number Timeout in
deploy_model()File:
src/opengradient/client/alpha.py—deploy_model()What's broken
Every
wait_for_transaction_receiptcall in this file consistently uses the defined constantsINFERENCE_TX_TIMEOUT = 120orREGULAR_TX_TIMEOUT = 30, except for one outlier indeploy_model()(line 318) which uses a hardcoded60:Contract deployment is the most resource-intensive transaction type (deploys full bytecode on-chain). It should use
INFERENCE_TX_TIMEOUT = 120at minimum, not an arbitrary 60s that:TimeExhaustedfailures on congested networksFix
Impact
deploy_model()times out after 60s (arbitrary)INFERENCE_TX_TIMEOUT(120s), consistent with all other heavy transactionsFiles Changed
src/opengradient/client/alpha.py